//
//  YDQuestionHeaderModel.m
//  PeiZiWangBei
//
//  Created by LK-IOS on 2017/11/13.
//  Copyright © 2017年 LK-IOS. All rights reserved.
//

#import "YDQuestionHeaderModel.h"

@implementation YDQuestionHeaderModel


+ (NSDictionary *)objectClassInArray{
    return @{
             @"details" : @"YDQuestionCellModel"
             };
}


-(CGFloat)headH
{
    
    //左右间距
    CGFloat marginL = rate375(20);
    //上下间距
    CGFloat marginT;
    if (isPhoneX) {
        marginT = rateX812(12);
    }else{
        marginT = rate750(12);
    }
    
    //图片frame
    CGFloat imageX = marginL;
    CGFloat imageY = marginT;
    CGFloat imageWH = rate375(22);
    _imageFrame = CGRectMake(imageX, imageY, imageWH, imageWH);
    
    
    //标题的frame
    CGFloat titleW = rate375(274);
    CGFloat titleH = [NSString getWrapSpaceLabelHeight:self.title withFont:[UIFont systemFontOfSize:font16ScreenWRate * LKScreenW] withWidth:titleW andWrapSpace:0.5 withSpace:1.0];
    
    _titleFrame = CGRectMake(rate375(45) + rate375(10), imageY, titleW, titleH);
    

    _buttonFrame = CGRectMake(0, 0, LKScreenW, CGRectGetMaxY(_titleFrame) + marginT);
    _lineFrame = CGRectMake(rate375(20), _buttonFrame.size.height - 1, LKScreenW - rate375(20) * 2, 1);
    return CGRectGetMaxY(_titleFrame) + marginT;
}

@end
